import { Controller, Param, Post, Query, UploadedFile, UseInterceptors } from '@nestjs/common';
import { UploadFileService } from './upload-file.service';


import { FileInterceptor } from "@nestjs/platform-express"
import { ResponseInterceptor } from 'src/response/response.interceptor';
@Controller({
  path:'upload-file',
  version:'1'
})
@UseInterceptors(ResponseInterceptor)
export class UploadFileController {
  constructor(private readonly uploadFileService: UploadFileService) {}

  @Post('avator/:id')
  @UseInterceptors(FileInterceptor('file'))
  upload_avator(@UploadedFile() file:Express.Multer.File,@Param('id') id){
    return this.uploadFileService.upload_avator(file,id)
  }
}
